package ${package};

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.lang.StringUtils;
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;

public class AbstractSpringDaoTest extends AbstractDependencyInjectionSpringContextTests {
	protected final Logger logger = LoggerFactory.getLogger(AbstractSpringDaoTest.class);
	
	protected String[] getConfigLocations() {
		String clientSpring=getClientSpring();
		if (null == clientSpring) {
			return new String[] {
					"classpath:spring*.xml","classpath:spring/*.xml"};
		} else {
			clientSpring="classpath:spring_dao_config.xml;"+clientSpring;
			return StringUtils.split(clientSpring, ';');
		}
	}
	
	protected Object getBean(String name){
		return this.applicationContext.getBean(name);
	}
	
	protected String getClientSpring() {
		return "";
	}
	
}
